
package com.linkage.yninterface.process.processClass;


import com.linkage.yninterface.util.sysConst;
import com.linkage.yninterface.process.*;

import java.util.*;
import com.linkage.yninterface.util.sysUtil;
import com.linkage.yninterface.db.DB;

/**
 * <p>Title: yun nan CRM interface</p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2010</p>
 *
 * <p>Company: linkage</p>
 *
 * @author weib
 * @version 1.0
 */
public class processcard extends process {

    private DB db = new DB(sysConst.mainDBJNDI);

    public processResult checkServiceName(processPara pp) throws Exception {
        HashMap hm = pp.getParseFields();

        String cardno = ((processMapInfo) hm.get(".cardno")).getValue().trim();
        String expiredate = ((processMapInfo) hm.get(".expiredate")).getValue().trim();

        String hash = sysUtil.getHash(cardno);
    
        String sql = "update b_card_user"+hash+" set expiredate=to_date('" + expiredate +
                     "','yyyy-mm-dd HH24:mi:ss') ,moddate=sysdate,modoperator='" +
                     pp.getLogininfo().getLoginName() + "' where cardno='" + cardno +
                     "'";
    
        db.execute(sql);
        
        return new processResult(sysConst.resultCode0,
                                         sysConst.reaultDes0);
        
        
    

    }

}

